﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Content/Master.Master" Inherits="System.Web.Mvc.ViewPage<SCS.Core.Models.Collection.PriceCollection>" %>
<%@ Import Namespace="SCS.Core" %>
<%@ Import Namespace="SCS.Core.Models" %>
<%@ Import Namespace="SCS.Core.ViewModels" %>
<%@ Import Namespace="SCS.Core.Controllers" %>
<%@ Import Namespace="SCSService" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Giá sản phẩm
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <link rel="stylesheet" type="text/css" href="/Content/smoothness-1.8.13/jquery-ui-1.8.13.custom.css">
    <link rel="stylesheet" type="text/css" href="/Content/smoothness-1.8.13/ui.dropdownchecklist.themeroller.css">
    <script type="text/javascript" src="/Scripts/jquery-1.6.1.min.js"></script>
    <script type="text/javascript" src="/Scripts/jquery-ui-1.8.13.custom.min.js"></script>
    <script type="text/javascript" src="/Scripts/ui.dropdownchecklist-1.4-min.js"></script>
    <script src="/Scripts/jquery.selectboxes.min.js" type="text/javascript"></script>
   <%--Validator--%>
    <script src="/Scripts/jquery.validate.min.js" type="text/javascript"></script>
    <script src="/Scripts/MicrosoftMvcJQueryValidation.js" type="text/javascript"></script>
     <script type="text/javascript">
         $(function () {
             $("#StartDate").datepicker({ dateFormat: 'dd/mm/yy' });
             $("#EndDate").datepicker({ dateFormat: 'dd/mm/yy' });
         });
	</script>
    <% Html.EnableClientValidation(); %>
   <% using (Html.BeginForm((bool)ViewData["IsAdd"] ? "SaveAddPrice" : "SaveEditPrice", "Stock", FormMethod.Post, new { siteGuid = "sendFileForm", language = "sendFileForm", id = "sendFileForm", enctype = "multipart/form-data" }))
            {%>
     
     <div class="clear"></div>
       
        <div class="box ">
		    <h2 class="box-header"><%=(bool)ViewData["IsAdd"] ? "Thêm mới giá sản phẩm" : "Sửa giá sản phẩm" %></h2>
		    <div class="box-content">

                <label class="form-label"> Giá sản phẩm </label>
                <%= Html.TextBoxFor(m => m.PriceValue, new { @class = "form-field small" })%> <span style="color:Red;font-weight:bold"><%= Html.ValidationMessageFor(m => m.PriceValue) %></span>

                 <label class="form-label"> Ngày Nhập </label>
                 <%if ((bool)ViewData["IsAdd"])
                   { %>
                 <%=Html.TextBoxFor(m => m.StartDate, new { @class = "form-field datepicker" })%> <span style="color:Red;font-weight:bold"> <%= Html.ValidationMessageFor(m => m.StartDate)%> </span>
                 <%}
                   else
                   {
                   %>
                   <%=Html.TextBoxFor(m => m.StartDate, new { @class = "form-field datepicker"})%> <span style="color:Red;font-weight:bold"> <%= Html.ValidationMessageFor(m => m.StartDate)%> </span>
                   <%} %>
                  <label class="form-label"> Ngày sửa </label>
                  <%if (!(bool)ViewData["IsAdd"])
                    {%>
                    <%=Html.TextBoxFor(m => m.EndDate, new { @class = "form-field datepicker", @readonly = "readonly" })%><span style="color:Red;font-weight:bold"> <%= Html.ValidationMessageFor(m => m.EndDate)%></span>
                   <%}
                    else
                    { %>
                    <%=Html.TextBoxFor(m => m.EndDate, new { @class = "form-field datepicker", @readonly = "readonly" })%><span style="color:Red;font-weight:bold"> <%= Html.ValidationMessageFor(m => m.EndDate)%></span>
                   <%} %>
                
                 <label class="form-label"> Ghi chú </label>
                 <%= Html.TextAreaFor(m => m.Notes, new { @class = "form-field half" })%>
                                                    
                 <label class="form-label"> Tiền tệ </label>
                 <%= Html.DropDownListFor(m => m.CurrencyID, (SelectList)ViewData["ListCurrencyDrop"])%>
                 
                 <label class="form-label"> Hiển thị Lên Websiste </label>
                 <%if (Model.Status == true)
                   {
                   %>
                        <%=Html.CheckBox("Status", true)%> Hiển thị
                   <%
                     }
                   else
                   {
                       if ((bool)ViewData["IsAdd"])
                       {
                       %>
                        <%=Html.CheckBox("Status", true)%> Hiển thị
                       <%
                       }
                       else
                       { 
                       %>
                        <%=Html.CheckBox("Status", false)%> Hiển thị
                       <%
                       }
                    
                   } 
                    %>

                 <%=Html.TextBoxFor(m => m.LanguagesID, new {@Style="display:none" })%>

                 <%=Html.TextBoxFor(m=>m.ProductID,new {@Style="display:none"}) %>
                 <%=Html.HiddenFor(m=>m.PriceID) %>
                 <p>
                <%=ViewData["Result"]%>
                </p>
                    
                  <input type="submit" value="" class="button white_input save_input " style="width: 74px;height: 28px; float:left; margin-right:10px;"/> <!--Button Save-->
                  <a class="button white" href="javascript:history.back();"><span class="icon_text cancel"></span>Đóng</a> <!--Button Close-->
                 
	        </div>
	    </div>
        <div class="clear"></div>
    
    
    <% } %>

</asp:Content>
